package cn.kongwg.boot.async;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author kongwg
 * @create 2021-03-24 9:42
 */
@Component
public class AsyncTest {

    @Async
    public void hello() throws InterruptedException {
        Thread.sleep(3000L);
        System.out.println("wo shi yi bu renwu ");

    }

//    @Scheduled(cron = "0/2 * * * * ?")
    public void hello2(){
        System.out.println("ds.....");
    }
}
